package com.Sake.chatroom.controller;

import com.Sake.common.utils.http.WebSocketService;
import com.Sake.common.utils.tengxunyun.TenXunUtils;
import com.alibaba.fastjson.JSONObject;
import com.Sake.common.annotation.LoggerManage;
import com.Sake.common.core.activeMQ.JmsRoomProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author zsh
 * @date 2021.6.10
 */
@RestController
@RequestMapping("/toChatWith/user")
public class ChatroomController {

    /**
     * ActiveMQ queue
     */
    @Autowired
    private JmsRoomProducer jmsRoomProducer;
    /**
     * ActiveMQ queue
     */
    @Autowired
    private WebSocketService webSocketService;


    @PostMapping(value = "/sendAMessage", produces = "application/json", consumes = "application/json")
    @LoggerManage(moduleName = "聊天室模块", option = "发送消息")
    @PreAuthorize("@ss.hasPermi('system:dict:list')")
    public JSONObject selectStudyMedia(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
        return null;
    }


}
